package com.qfjy.zhudongdong;

/**
 * @author : Z-Star
 * @version : 1.0
 * @date : 2022/9/13 18:56
 */

public class BinaryObserver extends Observer{

    public BinaryObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "二进制 String: "
                + Integer.toBinaryString( subject.getState() ) );
    }
}

